//
//  OADTitleHeaderViewModel.m
//  OASDK_Works
//
//  Created by ChenJie on 5/21/20.
//  Copyright © 2020 Mist. All rights reserved.
//

#import "OADTitleHeaderViewModel.h"
#import "OASDK.h"

@interface OADTitleHeaderViewModel ()

@end

@implementation OADTitleHeaderViewModel

#pragma mark - Lifecycle methods

- (instancetype)init {
    self = [super init];
    if (self) {
    }
    return self;
}

#pragma mark - Public methods

- (void)addField:(OADTitleHeaderFieldViewModel *)fieldViewModel {
    [self.fields addObject:fieldViewModel];
    
    self.totalBaseWidth += fieldViewModel.width;
    self.totalFlex += fieldViewModel.flex;
}

#pragma mark - Private methods



#pragma mark - Delegate methods



#pragma mark - Setter



#pragma mark - Getter

- (NSMutableArray<OADTitleHeaderFieldViewModel *> *)fields {
    if (!_fields) {
        _fields = [NSMutableArray array];
    }
    return _fields;
}

#pragma mark - Memory management methods

- (void)dealloc {
    OALogFunction;
}

@end
